/**
 * 
 */
package au.edu.swin.videoshop.ui.components;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.faces.model.SelectItem;

public class DateComponent implements Serializable {
	private List mDays;
	private List mMonths;
	private List mYears;
	private List mDaysWithEmptyOption;
	private List mMonthsWithEmptyOption;
	private List mYearsWithEmptyOption;
	
	public DateComponent() {
		mDays = new ArrayList();
		for (int i = 1; i <=31; i++) {
			mDays.add(new SelectItem(new Integer(i), Integer.toString(i)));
		}
		
		mMonths = new ArrayList();
		mMonths.add(new SelectItem(new Integer(0), "January"));
		mMonths.add(new SelectItem(new Integer(1), "Febuary"));
		mMonths.add(new SelectItem(new Integer(2), "March"));
		mMonths.add(new SelectItem(new Integer(3), "April"));
		mMonths.add(new SelectItem(new Integer(4), "May"));
		mMonths.add(new SelectItem(new Integer(5), "June"));
		mMonths.add(new SelectItem(new Integer(6), "July"));
		mMonths.add(new SelectItem(new Integer(7), "August"));
		mMonths.add(new SelectItem(new Integer(8), "September"));
		mMonths.add(new SelectItem(new Integer(9), "October"));
		mMonths.add(new SelectItem(new Integer(10), "November"));
		mMonths.add(new SelectItem(new Integer(11), "December"));
		
		mYears = new ArrayList();
		for (int i = 2000; i <=2099; i++) {
			mYears.add(new SelectItem(new Integer(i), Integer.toString(i)));
		}
		
		
		mDaysWithEmptyOption= new ArrayList();
		mDaysWithEmptyOption.add(new SelectItem(null, "Select a day"));
		mDaysWithEmptyOption.addAll(mDays);
		
		mMonthsWithEmptyOption= new ArrayList();
		mMonthsWithEmptyOption.add(new SelectItem(null, "Select a month"));
		mMonthsWithEmptyOption.addAll(mMonths);
		
		mYearsWithEmptyOption= new ArrayList();
		mYearsWithEmptyOption.add(new SelectItem(null, "Select a year"));
		mYearsWithEmptyOption.addAll(mYears);
	}
	
	
	/**
	 * @return the days
	 */
	public List getDays() {
		return mDays;
	}
	
	/**
	 * @return the months
	 */
	public List getMonths() {
		return mMonths;
	}
	
	/**
	 * @return the years
	 */
	public List getYears() {
		return mYears;
	}
	
	/**
	 * @return the days
	 */
	public List getDaysWithEmpyOption() {
		return mDaysWithEmptyOption;
	}
	
	/**
	 * @return the months
	 */
	public List getMonthsWithEmpyOption() {
		return mMonthsWithEmptyOption;
	}
	
	/**
	 * @return the years
	 */
	public List getYearsWithEmpyOption() {
		return mYearsWithEmptyOption;
	}
	
	
}